<script setup lang='ts'>
// 编译器宏函数
// 父传子,用于接收
const props = defineProps({
    car: String,
    changeC: Function
})
console.log(props)
// const emit = defineEmits(['changeCar'])

</script>

<template>
    <div>
        <div>子组件{{ car }}</div>
        <!-- <button @click="emit('changeCar', 'dake')">换车</button> -->
        <button @click="changeC('大客')">换车</button>
    </div>
</template>

<style scoped></style>